package org.joe.chinachess.ui;

import org.joe.chinachess.utils.Constants;

import javax.swing.*;
import java.awt.*;

/**
 * @author Joe
 * 
 */
@SuppressWarnings("serial")
public class MainFrame extends JFrame {

	public MainFrame() {
		this.setTitle(Constants.name + "-" + Constants.version);
		this.setSize(Constants.WINDOW_WIDTH, Constants.WINDOW_HEIGHT);
		this.setLocation(Constants.LOCATION_X, Constants.LOCATION_Y);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setResizable(true);
		this.getContentPane().setLayout(new BorderLayout());
		NorthPanel northPanel = new NorthPanel();
		this.getContentPane().add(northPanel, BorderLayout.NORTH);
		this.getContentPane().add(new MainPanel(northPanel), BorderLayout.CENTER);
		this.setVisible(true);
		//this.getContentPane().add(new ChatPanel(), BorderLayout.EAST);
	}

	public static void main(String[] args) {
		new MainFrame();
	}
}
